﻿using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
namespace MVC.Models
{
    public class Movie
    {
        public int ID { get; set; }
        [StringLength(60, MinimumLength = 3)]
        public string Title { get; set; }
        [Display(Name = "Rlese Date")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime ReleseDate { get; set; }
        [RegularExpression(@"^[A-Z]+[a-zA-Z''-'\S]*$")]
        [Required]
        [StringLength(30)]
        public string Genre { get; set; }
        [Range(1, 1000)]
        [DataType(DataType.Currency)]
        public decimal Price { get; set; }
    }
    public class MovieDBConetext : DbContext
    {
        public DbSet<Movie> movies { get; set; }
      
    }
}